<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
        <title>粉丝福利团</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no">
        <link href="{$res}css/show_card_ret.css" rel="stylesheet" type="text/css" />
		<link href="{$res}css/show_card.css" rel="stylesheet" type="text/css" />
		<link href="{$res}css/sharepic.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="{$res}js/jquery.min.js"></script>
        <script type="text/javascript">
            $(function($) {
                document.addEventListener("selectionchange",
                function(e) {
                    if (window.getSelection().anchorNode.parentNode.id == 'copy_key' && document.getElementById('copy_key').innerText != window.getSelection()) {
                        var key = document.getElementById('copy_key');
                        window.getSelection().selectAllChildren(key);
                    }
                },
                false);
            });
        </script>
        <script type="text/javascript">
            $(function($) {
                setRootFontSize();
            });
            window.onresize = function() {
                setRootFontSize();
            }
            function setRootFontSize() {
                $('html').css('font-size', document.body.clientWidth / 15 + 'px');
            }
        </script>
        <style>
		#copy_key_ios{width:100%;text-align:center}
		#copy_key_ios2{width:100%;text-align:center}
		#copy_key_android{width:100%;text-align:center}
		#copy_key_android2{width:100%;text-align:center}
		</style>
    </head>
    
    <body style="background:#F4F4F4">
        <div class="body-wrap">



<div id="noyjq_main" style="z-index: 1000;display:{if $show}none{else}block{/if}" {if $show}onclick="$('#noyjq_main').hide();"{/if}>
<div class="atom-dialog-wrap atom-dialog-show" id="noyjq_tip" style="z-index: 999">
    <div class="atom-dialog " style="width:80%;height:auto">
        <div id="dialog_subview_of_atomdlg_10" class="atom-dialog-content">
            <div class="nolottery-wrap">
                <div class="nolottery-logo">
                    <img src="{$res}images/noyhq.png">
                </div>
                <div class="nolottery-tips">
                    优惠券已被领完或失效
                </div>
                <div class="nolottery-subTip">
                    直接购买请查看详情 <img src="{$res}images/wxtip.png" style="height:.5rem;padding-top:.15rem;"> 浏览器打开
                </div>
                {if $show}
				<a href="javascrpit:" class="nolottery-btn" onclick="showmore()">
                    <img src="{$res}images/btnbak.png">
                </a>
				{else}
				<a href="javascrpit:" class="nolottery-btn" onclick="showmore();">
                    <img src="{$res}images/btnbak2.png">
                </a>
				{/if}
            </div>
        </div>
    </div>
</div>
<div class="atom-mask atom-mask-show" id="noyjq_mask" style="z-index: 998"></div>
</div>



            <!--div class="kouling-back">
                <img src="{$res}images/back_card.png"
                onclick="javascript:window.history.go(-1);" />
            </div-->
			
            <div class="shop-info">
                <span class="shop-title">
                    {if $show['istmall']==1}天猫{else}淘宝{/if}
                </span>
                <span class="shop-logo">
                    <img src="{$res}images/shoplogo_card.png"
                    />
                </span>
                
				
				<div class="yhq" onclick="javascript:showthistkl(1);">
                    <span class="coupons-price"><strong>¥</strong>{php echo $q_jiage}</span>
					<span class="coupons-info">券有效期</span>
                    <span class="coupons-data">{php echo date('m/d',strtotime($show['itemyhj_etime']));} 剩 <span id="quan_num"></span> 张</span>
                    <span class="coupons-btn">
                        立即领券
                    </span>
                </div>


            </div>

<div class="item-detail-view">
<div class="item-wrap">
    <a href="javascript:" class="item-detail" >
        <div class="pic">
            <div class="img_show am-inline-block am-gallery am-gallery-default fq-background-white" data-am-widget="gallery" data-am-gallery="{ pureview: true }">
            <img src="{php echo tomedia($show['itempic'])}_150x150.jpg">
			</div>
        </div>
        <div class="item-content">
            <div class="title">
                <span>{if $show['wenan']}推荐理由：{$show['wenan']}{else}{$show['title']}{/if}</span>
            </div>
            <div class="tags">
                <!--span class="tmallTag tag">
                    <img src="{$res}images/istm.png" style="height: auto;max-width: 100%;">
                </span-->
                <span class="byTag tag">券后包邮</span>
                <span class="dealNum" style="font-size:0.5rem">销量 {$show['itemmsell']}</span>
            </div>
            <div class="price-origin">
                <span class="origin"><img src="{$res}images/{if $show['istmall']==1}istm{else}istaobao{/if}.png" style="height: auto;max-width: 16px;padding-bottom:3px;"> 现价：¥{$show['itemfee']}</span>
            </div>
            <div class="discount">
                <img class="img-tag" src="{$res}images/qhfee.png">
                <span class="sale">
                    <em>
                        ¥
                    </em>
                    {php echo $jiagenew;}
                </span>
            </div>
        </div>
    </a>
	<div class="yhq_nb_title">
                    长按框内文字 > 全选 > 复制
    </div>
</div>
</div>
<div class="yhq_nb_mes">
                    <!--span id="copy_key">
                        【{if $show['wenan']}推荐理由：{$show['wenan']}{else}{$show['title']}{/if}】，复制框内整段文字，打开「手机淘宝」即可「领取优惠券」并购买{$show['itemyhj_tkl']}
                    </span-->
					<span id="copy_key_ios2" style="color:#f40">复制这条信息，打开手机淘宝{$show['itemyhj_tkl']}即可领取优惠券</span>
					<textarea rows=4 style="font-size:13px;color:#f40;display: none;ime-mode: disabled;overflow-y:visible;height:100%;" id="copy_key_android2" type="text" class="am-form-field am-text-center am-text-mss pt10" oninput="regain();">复制这条信息，打开手机淘宝{$show['itemyhj_tkl']}即可领取优惠券</textarea>
</div>


            
            <div class="yhq_nb" style="display:none" id="taokouling">
                <div class="yhq_nb_title">
                    长按框内文字 > 全选 > 复制
                </div>
                <div class="yhq_nb_mes">
                    <!--span id="copy_key">
                        【{if $show['wenan']}推荐理由：{$show['wenan']}{else}{$show['title']}{/if}】，复制框内整段文字，打开「手机淘宝」即可「领取优惠券」并购买{$show['itemyhj_tkl']}
                    </span-->
					<span id="copy_key_ios" style="color:#f40">复制这条信息，打开手机淘宝{$show['itemyhj_tkl']}即可领取优惠券</span>
					<textarea rows=4 style="font-size:13px;color:#f40;display: none;ime-mode: disabled;overflow-y:visible;height:100%;" id="copy_key_android" type="text" class="am-form-field am-text-center am-text-mss pt10" oninput="regain();">复制这条信息，打开手机淘宝{$show['itemyhj_tkl']}即可领取优惠券</textarea>
                </div>
                <div class="yhq_nb_mes_bo">复制后请记得打开手机淘宝哦</div>
                <div class="yhq_nb_ant">
                    <img src="{$res}images/okbtn.gif" onclick="javascript:hidethistkl()" />
                </div>
            </div>


        </div>
        <div class="fc_share">
            <img src="{$res}images/share_tip.png" style="width:80%" />
        </div>
        <div class="fc_share_bg">
        </div>


<div id="back_top" class="slide-box" style="position:fixed;bottom:50px;right:20px;z-index:100019;display:block">
<a href="javascript:scroll(0,0)" title="返回顶部" style="width:44px;"><img src="{$res}static/jwap/images/back-top.png" style="width:44px;"/></a>
</div>

<script type="text/javascript">
document.getElementById("back_top").style.display = "none";
window.onscroll = function () {
    
	var allheight = window.screen.height;
	

    if (document.documentElement.scrollTop + document.body.scrollTop > 300) {
        document.getElementById("back_top").style.display = "block";
    }
    else {
        document.getElementById("back_top").style.display = "none";
    }

	
}
</script>


<script>
    $(function() {
          //事件监听
          //------------------------------------------	
          document.addEventListener("selectionchange",
          function(e) {
            if (window.getSelection().anchorNode.parentNode.id == 'copy_key_ios' && document.getElementById('copy_key_ios').innerText != window.getSelection()) {
              var key = document.getElementById('copy_key_ios');
              window.getSelection().selectAllChildren(key);
            }
			if (window.getSelection().anchorNode.parentNode.id == 'copy_key_ios2' && document.getElementById('copy_key_ios2').innerText != window.getSelection()) {
              var key = document.getElementById('copy_key_ios2');
              window.getSelection().selectAllChildren(key);
            }
          },
          false);

    });

    var ua = navigator.userAgent.toLowerCase();
    if (ua.match(/iphone/i) == "iphone" || ua.match(/ipad/i) == "ipad") {

        $('.yhq_nb_title').html("长按框内文字 > 拷贝");

    } else {
        $("#copy_key_ios").hide();
        $("#copy_key_android").show();
		$("#copy_key_ios2").hide();
        $("#copy_key_android2").show();
    }

    var taokouling_value = document.getElementById("copy_key_android").value;
	var taokouling_value2 = document.getElementById("copy_key_android").value;
    function regain() {
        document.getElementById('copy_key_android').value = taokouling_value;
		document.getElementById('copy_key_android2').value = taokouling_value2;
    }
    
</script>

<script type="text/javascript">

            function showmore() {
                var index = parent.layer.getFrameIndex(window.name); 
                parent.layer.close(index); 
            }
            $(function($) {
                $('.fc_share_bg').click(function() {
                    $('.fc_share').hide();
                    $('.fc_share_bg').hide();
                    $('.yhq_nb').hide();
                });
                $('.fc_share').click(function() {
                    $('.fc_share').hide();
                    $('.fc_share_bg').hide();
                });
            });
            function showfxtip() {
                $('.fc_share').show();
                $('.fc_share_bg').show();
            }
            function showthistkl(_flag) {
                if (_flag == 0) {
                   // $('.yhq_nb_mes_bo').html('');
                } else {
                    //$('.yhq_nb_mes_bo').html('');
                }
                $('.yhq_nb').show();
                $('.fc_share_bg').show();
            }
            function hidethistkl() {
                $('.yhq_nb').hide();
                $('.fc_share_bg').hide();
            }
        </script>

		

    <script type="text/javascript">
	$(function(){


{if $_GPC['do']=='show_all' || $_GPC['do']=='show_mini'}

var url = "{php echo $this->createMobileUrl('hit_ajax',array('id'=>$_GPC['id'],'act'=>'itemall'));}";		
$.post(url, function(dat){
dat = eval('('+dat+')');
});

//判断
var url2 = "{php echo $this->createMobileUrl('yhj_all_ajax',array('quan_link'=>$show['quan_link'],'id'=>$show['id']));}";		
$.post(url2, function(dat){
dat = eval('('+dat+')');

if(dat.status==1){
$('#noyjq_main').show();
//$('#copy_key').html("来晚了，优惠券已被抢空！");
$('#copy_key_ios').html("来晚了，优惠券已被抢空！");
$('#copy_key_android').val("来晚了，优惠券已被抢空！");
$('#copy_key_ios2').html("来晚了，优惠券已被抢空！");
$('#copy_key_android2').val("来晚了，优惠券已被抢空！");
$('.yhq_nb_title').html("友情提示");
}

});
//判断



//更新
var url3 = "{php echo $this->createMobileUrl('yhj_num_ajax',array('quan_link'=>$show['quan_link'],'id'=>$show['id']));}";		
$.post(url3, function(dat){
dat = eval('('+dat+')');

if(dat.status==1){
$('#quan_num').html(dat.quan_num);
}

});
//更新

//加写
var url4 = "{php echo $this->createMobileUrl('yhj_tkl_all_ajax',array('id'=>$show['id']));}";		
$.post(url4, function(dat){
dat = eval('('+dat+')');

if(dat.status==1 && dat.tkl!='error'){
//$('#copy_key').html("复制框内整段文字，打开「手机淘宝」即可「领取优惠券」并购买"+dat.tkl);
$('#copy_key_ios').html("复制这条信息，打开手机淘宝"+dat.tkl+"即可领取优惠券");
$('#copy_key_android').val("复制这条信息，打开手机淘宝"+dat.tkl+"即可领取优惠券");
$('#copy_key_ios2').html("复制这条信息，打开手机淘宝"+dat.tkl+"即可领取优惠券");
$('#copy_key_android2').val("复制这条信息，打开手机淘宝"+dat.tkl+"即可领取优惠券");




}else if(dat.tkl=='error'){

$('#noyjq_main').show();

}

});
//加写


{/if}


	});
</script>





</body>
</html>